Compatibility: MemINIT requires at least System 5.0 and a Macintosh 512KE. Under systems before 6.0.5, you will have to restart for any changes in the control panel to take effect. I know that the bar graph works OK in all color modes, including 32-bit, except 16-bit. It should work in 16-bit (thousands of colors) but I haven’t had a chance to test it. If anyone has any problems with it in 16-bit, please let me know. I also don’t know how it will react to an accellerated video card. If anyone has any problems with that, again, please let me know. My address is at the bottom of this help text. The pie graph should be OK with all video modes and cards. The Function of MemINIT: MemINIT 2.0 is a utility that displays the amount of memory that your Macintosh is using, and how much is free. It either puts a 1-pixel high bar at the top of the menu bar, replaces the apple symbol with a pie graph, or both. In both of these displays, the black (or darker colored) section is the amount of memory used, and the white (or lighter colored) section is the amout free. Note that this is only the amount of memory used and free for the current application - it doesn’t include any memory used by the system, and if you are running MultiFinder or System 7, it only displays the amount of memory used and free for the frontmost program. This means that MemINIT can NOT be used to judge how much memory is free to launch more programs. It is more useful to judge if the current program should get more or less memory, by selecting get info for it in the Finder and entering a new value for the application memory size. How to configure MemINIT: MemINIT is both a startup document, meaning it loads itself into memory when your computer starts up, and a control panel document, which means that you can configure it through the control panel (or just by double-clicking on it in System 7). Note that you must put in in your System Folder or Control Panels folder and reboot for it to take effect. To configure MemINIT, click it’s name in the control panel, or in System 7 double click it’s icon. Here are the controls and what they do: • Help - brings up this help text. But you obviously knew that… • Show Startup Icon - If this box is checked, then the MemINIT icon will appear at the bottom of the screen when it loads into memory during startup. If there is an error during startup, the MemINIT icon with an X through it will appear, regardless of the setting of this check box. • Bar Active - This box is checked if the bar graph is active. The bar graph must be active before you can change any of its settings. Here are what they do: • Update time - This value is how often the bar redraws itself. If the value is too small, the computer may slow down a small amount, and the bar may flicker when the cursor is moved. If the value is too large, the bar isn’t updated often. My favorite setting for this is 1/4 second. • Tick mark spacing - This value is how much memory the black tick marks should represent. What you want to set it to probably depends on how much memory you have and whether you usually use MultiFinder or System 7. If you keep clicking the down arrow, the value will go to “None,” in which case there are no tick marks. • Bar color - This is the color that the bar will be. Click the color sample to change it (this doesn’t work on black and white Macs). Note that the bar color you actually see may be different from the chosen one in 4 or 16 colors, because of the limited number of colors. • Pie Active - If this box is checked then the pie graph is active. The pie graph must be active before you can change any of its settings. Here are what they do: • Update time - This control operates like the corresponding bar graph control. The times are longer because the pie graph cannot be updated as often. • Pie color and pan color - These controls act like the bar color control. The pie color is the color of the “slice” of pie - the memory used, and the pan color is the color of the “pan” underneath the pie - the memory free. Technical stuff: The code installed to draw the graphs communicates with the control panel through what’s called gestalt. Gestalt is only present in system 6.0.5 and later - in earlier systems you must restart after you have changed any options in the control panel for them to take effect. The bar graph and the pie graph are updated in different ways. The bar graph is what’s called a VBL task - meaning a Vertical BLanking task. The image on your monitor is formed by an electron beam that sweeps across the screen for every row, and then back to the top of the screen, redrawing the entire screen every 60th of a second (75th of a second on some monitors). While the electron beam is making it’s way back to the top of the screen, VBL tasks get a chance to execute. During this time, MemINIT draws the bar graph. VBL tasks execute no matter what, even when a menu is pulled down or a button is being pressed. Therefore, the bar graph is updated while these things are happening. The drawing of the cursor is also a VBL task, and therefore while the mouse is moving the bar graph may not get its time soon enough and may flicker. Unfortunately, becuase VBL tasks can be executed at any time, they can’t rely on many other parts of the computer (such as QuickDraw). Therefore, MemINIT must draw directly to the screen. This is a tricky process, and I may have done something wrong that will make it crash on some computers. I’m not sure how an accelerated video card may interact with it - it may not look very good, but it shouldn’t cause any problems. Also, because it writes directly to the screen, if the cursor is on top of it, the cursor will be overwritten. Also, if the cursor is on top of it and then moved, an incorrect bar may show. This will correct itself in a few moments. The pie graph is a jGNEFilter. GetNextEvent (or WaitNextEvent under MultiFinder or System 7) is a routine that gets input from the user. Programs must call it periodically to check for key pressed, mouse clicks, etc. a jGNEFilter gets a chance to look at that event and modify it. The pie graph uses this feature, but doesn’t worry about the event - it just uses the time to draw itself. Because it is not interrupting other parts of the system, it can use QuickDraw, and therefore should be very reliable. It will not overwrite the cursor, but the cursor may flicker a little when it is over the pie graph. For Techies: I install a VBL task, install a jGNEFilter that calls the old filter, and patch _DrawMenuBar (NOT a tail patch). I install a Gestalt routine with selector ‘MemV’. The code is installed in the system heap in a block that is about 1K in size. The VBL task is still active when the graph in deactivated, but it is only called about once every 18 hours and does nothing. If you want the code (the cdev code is in Pascal, the INIT code is in assembly), just send me a disk. It is also on America Online. There will (hopefully) be an article on it in MacTutor in the next few months (September-October 1991). Credits: Thanks to Symantec for their wonderful Pascal compiler and thanks to Patrick C. Beard and James W. Walker for their ShowIconFamily code. The Legal stuff: MemINIT 2.0 is not ShareWare; I am not asking for any money for it (of course, if you really want to…). However, it is not public domain. It may not be distributed with any package that is charged for without my consent, unless the charge is just for duplication and handling (i.e. user groups). If you make any changes and want to distibute a changed version, contact me. Also contact me if you have any suggestions or bug reports. Version History: • MemINIT 0.98 - Very buggy, no control panel interface. • MemINIT cdev 1.5.1 - Didn’t work correctly with color. • MemINIT cdev 2.0 - Complete re-write. Works well with color. How to contact me: I am ‘SethML’ on America Online and ‘AccuLab’ on AppleLink. During the school year: Seth LaForge 658 Wildcat Cny. Berkeley, CA 94708 During the summer: Seth LaForge 450 Redmond Rd. Eureka, CA 95501